package grape.base.rest.client.impl.user;

import grape.base.rest.client.user.UserClient;
import grape.base.rest.user.mvc.UserInnerController;
import grape.base.service.user.dto.UserInnerDetailDto;
import grape.base.service.user.dto.UserThirdCreateParam;
import grape.base.service.user.po.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * Created by yangwei
 * Created at 2020/4/26 16:44
 */
@Component
public class UserClientImpl implements UserClient {
    @Autowired
    private UserInnerController userInnerController;

    @Override
    public UserInnerDetailDto details(String identifier,String identifierTypeDictCode) {
        return userInnerController.details(identifier,identifierTypeDictCode);
    }

    @Override
    public UserInnerDetailDto detailsById(String userId) {
        return userInnerController.detailsById(userId);
    }

    @Override
    public User getUserById(String userId) {
        return userInnerController.getUserByUserId(userId);
    }

    @Override
    public List<User> getUserByIds(List<String> userIds) {
        return userInnerController.getUserByUserIds(userIds);
    }

    @Override
    public User saveOrUpdateFrontUser(UserThirdCreateParam cp) {
        return userInnerController.saveOrUpdateThirdUser(cp);
    }
}
